﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Sovigaz.DataProvider
{
    public interface IAuditableEntity
    {
        bool IsDeleted { get; set; }

        bool IsActived { get; set; }

        int CreatedBy { get; set; }

        DateTime CreatedDate { get; set; }

        int UpdatedBy { get; set; }

        DateTime UpdatedDate { get; set; }

        byte[] Tstamp { get; set; }
    }

    public abstract class AuditableEntity : IAuditableEntity
    {
        public bool IsDeleted { get; set; }

        public bool IsActived { get; set; }

        public int CreatedBy { get; set; }

        public DateTime CreatedDate { get; set; }

        public int UpdatedBy { get; set; }

        public DateTime UpdatedDate { get; set; }

        [Timestamp]
        public byte[] Tstamp { get; set; }
    }
}